home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Oberon⁄F™ 1.1 / Mac / Mod / ResourceMgr (.txt) < prev    next >
Encoding:
Oberon Document  |  1995-06-15  |  6.4 KB  |  111 lines  |  [oODC/obnF]

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. TextViews.StdViewDesc
  11. TextViews.ViewDesc
  12. TextModels.StdModelDesc
  13. TextModels.ModelDesc
  14. TextModels.AttributesDesc
  15. Geneva
  16. Geneva
  17. StdStamps.StdViewDesc
  18. Geneva
  19. Geneva
  20. MODULE MacResourceMgr;
  21. (* cp 
  22.     ResType is LONGINT, not ARRAY 4 OF CHAR
  23.     IMPORT SYSTEM, MacTypes, MacFileMgr;
  24.     CONST
  25.         resSysHeap* = 64;
  26.         resPurgeable* = 32;
  27.         resLocked* = 16;
  28.         resProtected* = 8;
  29.         resPreload* = 4;
  30.         resChanged* = 2;
  31.         mapReadOnly* = 128;
  32.         mapCompact* = 64;
  33.         mapChanged* = 32;
  34.         TEXT* = 54455854H;
  35.         FONT* = 464F4E54H;
  36.         DRVR* = 44525652H;
  37.         DLOG* = 444C4F47H;
  38.         DITL* = 4449544CH;
  39.         STRlist* = 53545223H;
  40.         PATlist* = 50415423H;
  41.         CODE = 1;
  42.     TYPE ResType* = MacTypes.ResType;
  43.     (** Opening and Closing Resource Files **)
  44.     PROCEDURE [CODE] CreateResFile* (fileName: MacTypes.Str255) 0A9H, 0B1H;
  45.     PROCEDURE [CODE] OpenResFile* (filename: MacTypes.Str255): INTEGER 0A9H, 097H;
  46.     PROCEDURE [CODE] CloseResFile* (refNum: INTEGER) 0A9H, 09AH;
  47.     PROCEDURE [CODE] FSpOpenResFile*(spec: MacFileMgr.FSSpec; permission: MacTypes.SignedByte): INTEGER 030H, 03CH, 000H, 00DH, 0AAH, 052H;
  48.     PROCEDURE [CODE] FSpCreateResFile*(spec: MacFileMgr.FSSpec; creator, fileType: MacTypes.OSType; scriptTag: INTEGER) 030H, 03CH, 000H, 00EH, 0AAH, 052H;
  49.     (** Checking for Errors **)
  50.     PROCEDURE [CODE] ResError* (): INTEGER 0A9H, 0AFH;
  51.     (** Setting the Current Resource File **)
  52.     PROCEDURE [CODE] CurResFile* (): INTEGER 0A9H, 094H;
  53.     PROCEDURE [CODE] HomeResFile* (theResource: MacTypes.Handle): INTEGER 0A9H, 0A4H;
  54.     PROCEDURE [CODE] UseResFile* (refNum: INTEGER) 0A9H, 098H;
  55.     (** Getting Resource Types **)
  56.     PROCEDURE [CODE] CountTypes* (): INTEGER 0A9H, 09EH;
  57.     PROCEDURE [CODE] GetIndType* (VAR theType: ResType; index: INTEGER) 0A9H, 09FH;
  58.     (** Getting and Disposing of Resources **)
  59.     PROCEDURE [CODE] SetResLoad* (load: BOOLEAN) 0A9H, 09BH;
  60.     PROCEDURE [CODE] CountResources* (theType: ResType): INTEGER 0A9H, 09CH;
  61.     PROCEDURE [CODE] GetIndResource* (theType: ResType; index: INTEGER): MacTypes.Handle 0A9H, 09DH;
  62.     PROCEDURE [CODE] GetResource* (theType: ResType; theID: INTEGER): MacTypes.Handle 0A9H, 0A0H;
  63.     PROCEDURE [CODE] GetNamedResource* (theType: ResType; name: MacTypes.Str255): MacTypes.Handle 0A9H, 0A1H;
  64.     PROCEDURE [CODE] LoadResource* (theResource: MacTypes.Handle) 0A9H, 0A2H;
  65.     PROCEDURE [CODE] ReleaseResource* (theResource: MacTypes.Handle) 0A9H, 0A3H;
  66.     PROCEDURE [CODE] DetachResource* (theResource: MacTypes.Handle) 0A9H, 092H;
  67.     (** Getting Resource Information **)
  68.     PROCEDURE [CODE] UniqueID* (theType: ResType): INTEGER 0A9H, 0C1H;
  69.     PROCEDURE [CODE] GetResInfo* (theResource: MacTypes.Handle; VAR theID: INTEGER;
  70.                         VAR theType: ResType; VAR name: MacTypes.Str255) 0A9H, 0A8H;
  71.     PROCEDURE [CODE] GetResAttrs* (theResource: MacTypes.Handle): MacTypes.Set 0A9H, 0A6H;
  72.     PROCEDURE [CODE] SizeResource* (theResource: MacTypes.Handle): LONGINT 0A9H, 0A5H;
  73.     (** Modifying Resources **)
  74.     PROCEDURE [CODE] SetResInfo* (theResource: MacTypes.Handle; theID: INTEGER;
  75.                         name: MacTypes.Str255) 0A9H, 0A9H;
  76.     PROCEDURE [CODE] SetResAttrs* (theResource: MacTypes.Handle; attrs: MacTypes.Set) 0A9H, 0A7H;
  77.     PROCEDURE [CODE] ChangedResource* (theResource: MacTypes.Handle) 0A9H, 0AAH;
  78.     PROCEDURE [CODE] AddResource* (theData: MacTypes.Handle; theType: ResType;
  79.                         theID: INTEGER; name: MacTypes.Str255) 0A9H, 0ABH;
  80.     PROCEDURE [CODE] RmveResource* (theResource: MacTypes.Handle) 0A9H, 0ADH;
  81.     PROCEDURE [CODE] UpdateResFile* (refNum: INTEGER) 0A9H, 099H;
  82.     PROCEDURE [CODE] WriteResource* (theResource: MacTypes.Handle) 0A9H, 0B0H;
  83.     PROCEDURE [CODE] SetResPurge* (install: BOOLEAN) 0A9H, 093H;
  84.     (** Advanced Routines **)
  85.     PROCEDURE [CODE] GetResFileAttrs* (refNum: INTEGER): MacTypes.Set 0A9H, 0F6H;
  86.     PROCEDURE [CODE] SetResFileAttrs* (refNum: INTEGER; attrs: MacTypes.Set) 0A9H, 0F7H;
  87.     (** 128K ROM **)
  88.     PROCEDURE [CODE] Count1Types* (): INTEGER 0A8H, 01CH;
  89.     PROCEDURE [CODE] Get1IndType* (VAR theType: ResType; index: INTEGER) 0A8H, 00FH;
  90.     PROCEDURE [CODE] Count1Resources* (theType: ResType): INTEGER 0A8H, 00DH;
  91.     PROCEDURE [CODE] Get1IndResource* (theType: ResType; index: INTEGER): MacTypes.Handle 0A8H, 00EH;
  92.     PROCEDURE [CODE] Get1Resource* (theType: ResType; theID: INTEGER): MacTypes.Handle 0A8H, 01FH;
  93.     PROCEDURE [CODE] Get1NamedResource* (theType: ResType; name: MacTypes.Str255): MacTypes.Handle 0A8H, 020H;
  94.     PROCEDURE [CODE] Unique1ID* (theType: ResType): INTEGER 0A8H, 010H;
  95.     PROCEDURE [CODE] MaxSizeRsrc* (theResource: MacTypes.Handle): LONGINT 0A8H, 021H;
  96.     PROCEDURE [CODE] RsrcMapEntry* (theResource: MacTypes.Handle): LONGINT 0A9H, 0C5H;
  97.     PROCEDURE [CODE] OpenRFPerm* (fileName: MacTypes.Str255; vRefNum: INTEGER; 
  98.                         permission: MacTypes.UnpackedByte): INTEGER 0A9H, 0C4H;
  99. END MacResourceMgr.
  100. TextControllers.StdCtrlDesc
  101. TextControllers.ControllerDesc
  102. Containers.ControllerDesc
  103. Controllers.ControllerDesc
  104. TextRulers.StdRulerDesc
  105. TextRulers.RulerDesc
  106. TextRulers.StdStyleDesc
  107. TextRulers.StyleDesc
  108. TextRulers.AttributesDesc
  109. Geneva
  110. Documents.ControllerDesc
  111.